package com.techstar.ats.codec.history.decoder;

import io.netty.buffer.ByteBuf;
import com.techstar.ats.codec.DateTimeCodec;
import com.techstar.ats.codec.Decoder;
import com.techstar.ats.codec.StringCodec;
import com.techstar.ats.dxp.history.F14DriverDistance;

public enum F14DriverDistanceDecoder implements Decoder<F14DriverDistance> {
	INSTANCE;

	public F14DriverDistance create() {
		return new F14DriverDistance();
	}

	public void decode(ByteBuf buf, F14DriverDistance value) {
		value.dateTime = DateTimeCodec.INSTANCE.get(buf);
		value.driver = (new StringCodec(13)).get(buf);
		value.distance = buf.readUnsignedInt();
	}
}
